#include "Enviroment.h"

namespace FlooP
{
	Environment::Environment () {}

	void Environment::add_procedure (std::shared_ptr<Procedure> procedure)
	{
		m_procedures.push_back (procedure);
	}

	std::shared_ptr<Procedure> Environment::find_procedure (const std::string& name)
	{
		std::shared_ptr<Procedure> ret;

		for (uint32_t i = 0; i < m_procedures.size (); i++) {
			if (name == m_procedures[i]->name ()) {
				ret = m_procedures[i];
			}
		}

		return ret;
	}
}